/*
 * @Author: dlb
 * @Date: 2020-07-03 14:26:25
 * @LastEditTime: 2020-07-03 14:28:39
 * @LastEditors: dlb
 * @Description:
 * @FilePath: \zhufeng-cli-project\my-cli2\src\index.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
//命令行的命令名称拿到后  这个是主流程控制的地方
import { betterRequire } from './utils/common';//动态加载文件
import { resolve } from 'path'
let apply = (action, ...args) => {
    // console.log(action, args)

    //babel-env  export default=>module.exports={default:xxx}
    betterRequire(resolve(__dirname, `./${action}`))(...args) //默认导出
}
export default apply